package expansion.sort;

/**
 * @author:yuziji
 * @create: 2023-04-16 09:46
 */
public class A {
    public A(){
        System.out.println("父类的构造方法");
    }

    {
        System.out.println("父类的代码块");
    }
    static {
        System.out.println("父类的静态代码块");
    }
}
class B extends A{
    public B(){
        System.out.println("子类的构造方法");


    }
    {
        System.out.println("子类的代码块");
    }
    static {
        System.out.println("子类的静态代码块");
    }

    public static void main(String[] args) {
        B b = new B();
    }
}

